<div class="divColorbox">
    <div class="divColorbox_Header">
        <span><i class="fa fa-star"></i><span>管理员信息</span></span>
        <a class="Refresh"></a><a class="Close"></a>
    </div>
    <div class="divColorbox_Body row">
        <ul id="MenuTabs" class="nav nav-tabs">
            <li><a data-toggle="tab" href="#MenuTabs_Base">基本信息</a></li>
            <li><a data-toggle="tab" href="#MenuTabs_Operation" data-permission-code="{Base}[Log](Admin-Operation-List)">操作日志</a></li>
        </ul>
        <div class="tab-content">
            <div id="MenuTabs_Base" class="tab-pane">
                <div class="row">
                    <div class="col-sm-3">
                        <div class="input-group">
                            <span class="input-group-addon">用户ID</span>
                            <input id="User_ID" type="text" class="form-control" readonly/>
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group">
                            <span class="input-group-addon">真实姓名</span>
                            <input id="RealName" type="text" class="form-control" readonly/>
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group">
                            <span class="input-group-addon">手机号</span>
                            <input id="Phone" type="text" class="form-control" readonly/>
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group">
                            <span class="input-group-addon">状态</span>
                            <input id="Status_Name" type="text" class="form-control" readonly/>
                            <span class="input-group-addon">
                                <i id="Status" class="fa"></i>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="space-6"></div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="input-group">
                            <span class="input-group-addon">注册时间</span>
                            <input id="Create_Date" type="text" class="form-control" readonly/>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="input-group">
                            <span class="input-group-addon">注册IP</span>
                            <input id="Create_IP" type="text" class="form-control" readonly/>
                        </div>
                    </div>
                </div>
            </div>
            <div id="MenuTabs_Operation" class="tab-pane">
            </div>
        </div>
    </div>
    <div class="divColorbox_Footer">
        <div id="divPaginate_Operation" class="Paginate" MenuTabs="#MenuTabs_Operation"></div>
        <button type="button" id="btnEdit" class="btn btn-info" MenuTabs="#MenuTabs_Base" RightCode="{User}[Admin](Edit)">
            <i class="fa fa-pencil"></i> 修改资料
        </button>
        <button type="button" id="btnUndo"></button>
    </div>
</div>
<script src="<%- Virtual_Path.Static %>jquery.plugin/dataTables/jquery.dataTables.min.js"></script>
<script src="<%- Virtual_Path.Static %>jquery.plugin/dataTables/jquery.dataTables.bootstrap.min.js"></script>
<script>
    $(function () {
        //region 判断flag
        if (_PageData.flag !== 0) {
            $.KOC.Tips.Open('Error', _PageData.flag, {
                Timeout: 1000,
                onClose: function () {
                    parent.$.colorbox.close();
                }
            });
            return;
        }
        //endregion
        //endregion
        //region 页面数据绑定
        $('#User_ID').val(_PageData.User_ID);
        $('#RealName').val(_PageData.User_Info.RealName);
        $('#Phone').val(_PageData.User_Info.Phone);
        switch (_PageData.User_Info.Status) {
            case 0:
                $('#Status_Name').val('正常');
                $('#Status').addClass('fa-check green');
                break;
            case 1:
                $('#Status_Name').val('锁定');
                $('#Status').addClass('fa-lock red');
                break;
            default:
                $('#Status_Name').val('未知');
                $('#Status').addClass('fa-question');
                break;
        }
        $('#Create_Date').val(moment(_PageData.User_Info.Create_Date).format('YYYY/MM/DD HH:mm:ss'));
        $('#Create_IP').val(_PageData.User_Info.Create_IP);
        //endregion
        //region 修改
        $('#btnEdit').click(function () {
            $.CommonAdmin.OpenWindow(':UserAdminEdit:' + _PageData.User_ID, function () {
                location.reload(true);
            });
        });
        //endregion
    });
</script>